import pygame
from settings import *

class Button:
    def __init__(self, x, y, w, h, text):
        self.rect = pygame.Rect(x, y, w, h)
        self.text = text
        self.color = black

 def draw(self, surface):
        pygame.draw.rect(surface, COLOR_WHITE, self.rect)
        draw_text(surface, self.text, 22, self.rect.centerx, self.rect.centery)

    def is_clicked(self, pos):
        return self.rect.collidepoint(pos)

